package cn.cjp.day03;

import cn.cjp.day01.Student;

public class Usefuzi {
    public static void main(String[] args) {

        Teacher zi = new Teacher();
        Employee fu = new Employee();
   //重名
        //通过类直接访问
        System.out.println(fu.num);
        System.out.println(zi.num);
        System.out.println("======================");

        //间接通过方法访问，方法属于谁，就用谁
        zi.nummethodZi();
        zi.nummethodFu();
        System.out.println("======================");

        //父子类方法重名，谁调用就用谁，没有就往上一级
        zi.method1();
        System.out.println("======================");

        fu.methid2();
        zi.methid2();

    }

}
